<?php if(!class_exists('raintpl')){exit;}?><?php $tpl = new RainTPL;$tpl_dir_temp = self::$tpl_dir;$tpl->assign( $this->var );$tpl->draw( dirname("header") . ( substr("header",-1,1) != "/" ? "/" : "" ) . basename("header") );?>

<?php echo carouFredSel(); ?>

<div class ="wrapper">

	<div class = "main" id = "promotion">
		<h1 class = "fr"><?php echo $e['promotion'];?></h1>

		<div class = "content">
			<?php if( $promotion["image"] != '' ){ ?>
			<div class = "display">
				<img src = "<?php echo $promotion["image"];?>" height = "135" width = "180">
			</div>
			<?php } ?>

			<span class = "about-content"><?php echo $promotion['detail'];?></span>
		</div>

		<div id = "wrapper-relate" class = "clear">
			<h3><?php echo $e['other-promotion'];?></h3>
			<img src="http://localhost/waterfantasy/html/images/btn-prev.png" id = "btn-prev" class = "btn-prev">
			<img src="http://localhost/waterfantasy/html/images/btn-next.png" id = "btn-next" class = "btn-next">
			<ul id = "relate">
				<?php $counter1=-1; if( isset($all_promotion) && is_array($all_promotion) && sizeof($all_promotion) ) foreach( $all_promotion as $key1 => $value1 ){ $counter1++; ?>
				<li>
					<a href = "promotion.html?id=<?php echo $value1["id"];?>">
						<img src = "<?php echo $value1["thumb"];?>" class = "thumb">
						<span class = "desc"><?php echo $value1["promotion"];?></span>
					</a>
				</li>
				<?php } ?>
			</ul>
		</div>
	</div>

	<div class = "sidebar">
		<ul>
			<li><?php echo $e['promotion'];?></li>
			<li><a href = "promotion.html"><?php echo $e['promotion'];?></a></li>
		</ul>
	</div>
</div>

<script>

$(document).ready(function(){
    $("#relate").carouFredSel({
		auto : false,
		circular : false,
		infinite : false,
		excludedElements: "button, input, select, textarea, .noSwipe",
		width: 621,
		prev : {
			button : "#btn-prev",
			key : "left"
		},
		next : {
			button : "#btn-next",
			key : "right"
		},
		swipe : {
			onTouch : true,
		}
	});
});
</script>

<?php $tpl = new RainTPL;$tpl_dir_temp = self::$tpl_dir;$tpl->assign( $this->var );$tpl->draw( dirname("footer") . ( substr("footer",-1,1) != "/" ? "/" : "" ) . basename("footer") );?>